<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>biaoge</title>
</head>
<body>
	<form >
		
	</form>
<script>

    var data=[
		{
			name: "姓名",
			age:"年龄",
			grade:"段位",
			sex:"性别",
		 },];
	var html="<table border=1>";

            for(var i in data){

           
            html+="<tr class='aaa"+(i%2)+"'>";

			for(var j in data[i]){
				html+="<td>";
				html+=data[i][j];
				html+="</td>";
			}
				html+="</tr>";
			}
			html+="</table>";
			document.body.innerHTML=html;
</script>
</body>
</html>